#import "Stage.h"
@implementation Stage
@synthesize currentStage;
@synthesize enemy,image;
-(id)init:(int)i{
	if([super init]){
		currentStage=0;
		stages = [NSMutableArray arrayWithCapacity:8];
		[stages retain];
		[stages addObject:[UIImage imageNamed:@"stage_bay.jpg"]];
		[stages addObject:[UIImage imageNamed:@"stage_beach.jpg"]];
		[stages addObject:[UIImage imageNamed:@"stage_desert_city.jpg"]];
		[stages addObject:[UIImage imageNamed:@"stage_lake.jpg"]];
		[stages addObject:[UIImage imageNamed:@"stage_mill.jpg"]];
		[stages addObject:[UIImage imageNamed:@"stage_moutain.jpg"]];
		[stages addObject:[UIImage imageNamed:@"stage_valley.jpg"]];
		[stages addObject:[UIImage imageNamed:@"stage_vulcano.jpg"]];
		
		stageNr=i;
		enemy = [[CharInfo alloc] init:i];
		location = [[Location alloc]init:i];
		image=[UIImage imageNamed:location.stage];
		}
	return self;
}

-(UIImage*) getNextStageImage{
	Location* loc= [[Location alloc]init:stageNr+1];
	UIImage* i=[UIImage imageNamed:loc.stage];
	[i retain];
	return i;
}

-(UIImage*) getBackground{
	return [stages objectAtIndex:currentStage];
}
@end